arize-phoenix 4.10.0__py3-none-any.whl → 4.10.2rc0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-4.10.0.dist-info → arize_phoenix-4.10.2rc0.dist-info}/METADATA +1 -1
- {arize_phoenix-4.10.0.dist-info → arize_phoenix-4.10.2rc0.dist-info}/RECORD +27 -17
- phoenix/server/api/context.py +2 -0
- phoenix/server/api/dataloaders/__init__.py +2 -0
- phoenix/server/api/dataloaders/span_annotations.py +35 -0
- phoenix/server/api/types/Annotation.py +21 -0
- phoenix/server/api/types/Evaluation.py +4 -22
- phoenix/server/api/types/Span.py +16 -4
- phoenix/server/api/types/SpanAnnotation.py +4 -6
- phoenix/server/app.py +19 -0
- phoenix/server/main.py +4 -1
- phoenix/server/static/.vite/manifest.json +78 -0
- phoenix/server/static/assets/components-C8sm_r1F.js +1142 -0
- phoenix/server/static/assets/index-BEKPzgQs.js +100 -0
- phoenix/server/static/assets/pages-bN7juCjh.js +2885 -0
- phoenix/server/static/assets/vendor-CUDAPm8e.js +641 -0
- phoenix/server/static/assets/vendor-DxkFTwjz.css +1 -0
- phoenix/server/static/assets/vendor-arizeai-Do2HOmcL.js +662 -0
- phoenix/server/static/assets/vendor-codemirror-CrdxOlMs.js +12 -0
- phoenix/server/static/assets/vendor-recharts-PKRvByVe.js +59 -0
- phoenix/server/static/assets/vendor-three-DwGkEfCM.js +2998 -0
- phoenix/server/templates/index.html +76 -25
- phoenix/trace/schemas.py +1 -0
- phoenix/version.py +1 -1
- phoenix/server/static/index.css +0 -6
- phoenix/server/static/index.js +0 -8547
- {arize_phoenix-4.10.0.dist-info → arize_phoenix-4.10.2rc0.dist-info}/WHEEL +0 -0
- {arize_phoenix-4.10.0.dist-info → arize_phoenix-4.10.2rc0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-4.10.0.dist-info → arize_phoenix-4.10.2rc0.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,7 +5,7 @@ phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
|
5
5
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
6
6
|
phoenix/services.py,sha256=aTxhcOA1pZHB6U-B3TEcp6fqDF5oT0xCUvEUNMZVTUQ,5175
|
|
7
7
|
phoenix/settings.py,sha256=cO-qgis_S27nHirTobYI9hHPfZH18R--WMmxNdsVUwc,273
|
|
8
|
-
phoenix/version.py,sha256=
|
|
8
|
+
phoenix/version.py,sha256=uSpiMyzutYd4Aj7DF_RkbF2ysAnhTlUeM4asW3jWo1c,25
|
|
9
9
|
phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
|
|
11
11
|
phoenix/core/model.py,sha256=km_a--PBHOuA337ClRw9xqhOHhrUT6Rl9pz_zV0JYkQ,4843
|
|
@@ -60,19 +60,19 @@ phoenix/pointcloud/pointcloud.py,sha256=4zAIkKs2xOUbchpj4XDAV-iPMXrfAJ15TG6rlIYG
|
|
|
60
60
|
phoenix/pointcloud/projectors.py,sha256=zO_RrtDYSv2rqVOfIP2_9Cv11Dc8EmcZR94xhFcBYPU,1057
|
|
61
61
|
phoenix/pointcloud/umap_parameters.py,sha256=3UQSjrysVOvq2V4KNpTMqNqNiK0BsTZnPBHWZ4fyJtQ,1708
|
|
62
62
|
phoenix/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
|
-
phoenix/server/app.py,sha256=
|
|
63
|
+
phoenix/server/app.py,sha256=4Lz54FykyWbaoD83hrp4REFJBZlX6lfGz8zUq0M_XnM,19296
|
|
64
64
|
phoenix/server/grpc_server.py,sha256=faktLxEtWGlCB1bPR4QwwTsRoQloahKMx0hAWqRGI5s,3379
|
|
65
|
-
phoenix/server/main.py,sha256=
|
|
65
|
+
phoenix/server/main.py,sha256=dRyODpwkNi_3as14fnZ8LWW_JLWtpXHldRy9SNjNtws,11251
|
|
66
66
|
phoenix/server/prometheus.py,sha256=j9DHB2fERuq_ZKmwVaqR-9wx5WcPPuU1Cm5Bhg5241Y,2996
|
|
67
67
|
phoenix/server/telemetry.py,sha256=T_2OKrxNViAeaANlNspEekg_Y5uZIFWvKAnpz8Aoqvk,2762
|
|
68
68
|
phoenix/server/thread_server.py,sha256=dP6cm6Cf08jNhDA1TRlVZpziu1YgtPDmaeIJMm725eI,2154
|
|
69
69
|
phoenix/server/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
-
phoenix/server/api/context.py,sha256=
|
|
70
|
+
phoenix/server/api/context.py,sha256=DiK2IRMBbMvBF0uK20YBftApJXau4GSDHltVZX2yERQ,2957
|
|
71
71
|
phoenix/server/api/interceptor.py,sha256=ykDnoC_apUd-llVli3m1CW18kNSIgjz2qZ6m5JmPDu8,1294
|
|
72
72
|
phoenix/server/api/queries.py,sha256=eq2xHaQF-x4k6AGSY6b6mU2pie9bj-AJML6P2Mr0_DM,19886
|
|
73
73
|
phoenix/server/api/schema.py,sha256=BcxdqO5CSGqpKd-AAJHMjFlzaK9oJA8GJuxmMfcdjn4,434
|
|
74
74
|
phoenix/server/api/utils.py,sha256=Y1lGu8J8r8BSBX9OzffgewI8QMziovbG-ePDvZrrwGI,949
|
|
75
|
-
phoenix/server/api/dataloaders/__init__.py,sha256=
|
|
75
|
+
phoenix/server/api/dataloaders/__init__.py,sha256=F6-8dwb-aQ_T8LeRYg3LPR7T94__8Xe4ysM0VGQeQUQ,4936
|
|
76
76
|
phoenix/server/api/dataloaders/average_experiment_run_latency.py,sha256=RiO0AKC6Y5byafsV0zTJEIOt8Nudjte73f1T78cBe1k,1817
|
|
77
77
|
phoenix/server/api/dataloaders/dataset_example_revisions.py,sha256=Vpr5IEKSR4QnAVxE5NM7u92fPNgeHQV2ieYc6JakCj0,3788
|
|
78
78
|
phoenix/server/api/dataloaders/dataset_example_spans.py,sha256=_jLlo0KdUS65d4PNTtE9aXVyG_NZWgA7VcpNC9udQ8U,1484
|
|
@@ -88,6 +88,7 @@ phoenix/server/api/dataloaders/latency_ms_quantile.py,sha256=pEc7QjB2iiNOQm_Fmo9
|
|
|
88
88
|
phoenix/server/api/dataloaders/min_start_or_max_end_times.py,sha256=IoFX5PtSpvQdMk_7-oB8TpIse3Q4PMxep4qKggkHpzo,2902
|
|
89
89
|
phoenix/server/api/dataloaders/project_by_name.py,sha256=W4q-ddeVnja2DNwgg5l8mV2GNADNJf1CTXNcJaBWdfE,1165
|
|
90
90
|
phoenix/server/api/dataloaders/record_counts.py,sha256=mp3KlhwFw-Iy7o6bFxtJKC6B5kGinPIh5PxxNkrxf8o,4283
|
|
91
|
+
phoenix/server/api/dataloaders/span_annotations.py,sha256=pJQHF92b-CgBJFfZOf0siLsa-jHzr9ByfLiNGpb5oic,1262
|
|
91
92
|
phoenix/server/api/dataloaders/span_descendants.py,sha256=djqXXwupWaXkFdscoy-iILYijuxlqr8hJcv6JawsV6s,2162
|
|
92
93
|
phoenix/server/api/dataloaders/span_evaluations.py,sha256=quXGyj_OYvHrcWfzXlYIv7C1OCZiL1K7cWU-YEAlsNA,1316
|
|
93
94
|
phoenix/server/api/dataloaders/span_projects.py,sha256=KV--NTLpdXyFUGYN69KHeVVHDBJR2oupo1cgLvqK6Ko,1304
|
|
@@ -146,6 +147,7 @@ phoenix/server/api/routers/v1/experiment_runs.py,sha256=jy4SynmzdtQMoUzlowmG6wsV
|
|
|
146
147
|
phoenix/server/api/routers/v1/experiments.py,sha256=uVdmhyJgYI-UqOiRSJ-8OcVpL8a6Z02B5H2Rt_7yboY,11829
|
|
147
148
|
phoenix/server/api/routers/v1/spans.py,sha256=tryWFoJVFRLALzt6dfPmBBhKMS0s3hhlYdTathxVEU4,9638
|
|
148
149
|
phoenix/server/api/routers/v1/traces.py,sha256=PBIrpdJHVJ9gyiukCy1Ck1w0xts0VEHtRKaF7Noa248,8434
|
|
150
|
+
phoenix/server/api/types/Annotation.py,sha256=7Ym7iuVcbwHlw2yIRylz4nATAF_Cm-Z17qcjiooj1cc,751
|
|
149
151
|
phoenix/server/api/types/AnnotatorKind.py,sha256=rPgGdbN1Gvc109sGQ_ZH-gfJbp93V9wlarzTEJNtUwI,236
|
|
150
152
|
phoenix/server/api/types/Cluster.py,sha256=ac4YfT1OH3xLVmex7EUmB6b9IpULnhLTt554LR0jglE,5689
|
|
151
153
|
phoenix/server/api/types/CreateDatasetPayload.py,sha256=R-6zCmuD0f76RU9Giu78xwTHlASQs6Aq8yzvX1Kxc3g,140
|
|
@@ -164,7 +166,7 @@ phoenix/server/api/types/DocumentEvaluationSummary.py,sha256=EpgKn0uiH2Vbpyltc1M
|
|
|
164
166
|
phoenix/server/api/types/DocumentRetrievalMetrics.py,sha256=amkpC3H5IU5-9GvO0telpbq00m6lIcv_2v446OpwFwc,1822
|
|
165
167
|
phoenix/server/api/types/EmbeddingDimension.py,sha256=2OTVzAcfY-2xnJLl7122EAaqJyp0sob1v9-ryaNWknw,18961
|
|
166
168
|
phoenix/server/api/types/EmbeddingMetadata.py,sha256=fJvNNYCbkf3SJalArLy9rcBq9Uj1SNac60zjqe1PFnM,461
|
|
167
|
-
phoenix/server/api/types/Evaluation.py,sha256=
|
|
169
|
+
phoenix/server/api/types/Evaluation.py,sha256=oW9UfUCs6Td60kb5s6_sJNvUkxk5TQXjG0pmQ0-gT4M,3298
|
|
168
170
|
phoenix/server/api/types/EvaluationSummary.py,sha256=EFucuzAhcxR9sdEn6WNAtmAGJk-QR_3j3y7Mn2A9_bU,1528
|
|
169
171
|
phoenix/server/api/types/Event.py,sha256=XdYgaIxcVIW-YFViCkxj5l9OaVNepyIrCtm5Iqg2le8,3989
|
|
170
172
|
phoenix/server/api/types/EventMetadata.py,sha256=-J0tYF9eZTHwCjwxQHY7Gckr2_MNW5OoWT1mydweZNM,635
|
|
@@ -188,8 +190,8 @@ phoenix/server/api/types/Retrieval.py,sha256=OhMK2ncjoyp5h1yjKhjlKpoTbQrMHuxmgSF
|
|
|
188
190
|
phoenix/server/api/types/ScalarDriftMetricEnum.py,sha256=IUAcRPpgL41WdoIgK6cNk2Te38SspXGyEs-S1fY23_A,232
|
|
189
191
|
phoenix/server/api/types/Segments.py,sha256=m2yoegrxA1Tn7ZAy1rMjjD1isc752MaAXMoffkBlvrM,2921
|
|
190
192
|
phoenix/server/api/types/SortDir.py,sha256=OUpXhlCzCxPoXSDkJJygEs9Rw9pMymfaZUG5zPTrw4Y,152
|
|
191
|
-
phoenix/server/api/types/Span.py,sha256=
|
|
192
|
-
phoenix/server/api/types/SpanAnnotation.py,sha256=
|
|
193
|
+
phoenix/server/api/types/Span.py,sha256=Qlz5G_gjyy_jpadfc7CD9xB6TekCCySeEqM_hihcrhM,14208
|
|
194
|
+
phoenix/server/api/types/SpanAnnotation.py,sha256=6b5G-b_OoRvDL2ayWk7MkbqarLK-F-pQMx21CpUuNGY,1168
|
|
193
195
|
phoenix/server/api/types/TimeSeries.py,sha256=wjzuxHFqCey0O7Ys25qiXyuqXK8an-osyNWUE8A_8G4,5227
|
|
194
196
|
phoenix/server/api/types/Trace.py,sha256=ep-mPexub1ijxAnBvc2KrGsNVXO2SfDR1WxqER2wcD8,2376
|
|
195
197
|
phoenix/server/api/types/TraceAnnotation.py,sha256=OW6A2zr1gomOuG0XQe55dk15XXX2DSM0DzatRbHWH5A,1256
|
|
@@ -210,11 +212,19 @@ phoenix/server/static/apple-touch-icon-72x72.png,sha256=o_bsxRdNE9J6ciqXSvd8aJmd
|
|
|
210
212
|
phoenix/server/static/apple-touch-icon-76x76.png,sha256=CT_xT12I0u2i0WU8JzBZBuOQKRVuR1fNizdV68hi5Pk,5686
|
|
211
213
|
phoenix/server/static/apple-touch-icon.png,sha256=fOfpjqGpWYbJ0eAurKsyoZP1EAs6ZVooBJ_SGk2ZkDs,3801
|
|
212
214
|
phoenix/server/static/favicon.ico,sha256=bY0vvCKRftemZfPShwZtE93DiiQdaYaozkPGwNFr6H8,34494
|
|
213
|
-
phoenix/server/static/index.css,sha256=KKGpx4iwF91VGRm0YN-4cn8oC-oIqC6HecoPf0x3ZM8,1885
|
|
214
|
-
phoenix/server/static/index.js,sha256=WUcVFCMT2Eo8mZ23tPZQG_DViKcUMC9EIbeLCGdkflw,3525834
|
|
215
215
|
phoenix/server/static/modernizr.js,sha256=mvK-XtkNqjOral-QvzoqsyOMECXIMu5BQwSVN_wcU9c,2564
|
|
216
|
+
phoenix/server/static/.vite/manifest.json,sha256=HBf8Uvnr1-ERuZTBCdHFEF8tgiPQzhLFaK84vo0TmNQ,1929
|
|
217
|
+
phoenix/server/static/assets/components-C8sm_r1F.js,sha256=eU0wbaPT17BDumNQKBL-VMI4GcXSd_OmNKr7jkDNKJY,160991
|
|
218
|
+
phoenix/server/static/assets/index-BEKPzgQs.js,sha256=eo_7Yc0oaqrRnlXKnz8k3adfq0bFNH_mhO_JyHq7Dvc,7362
|
|
219
|
+
phoenix/server/static/assets/pages-bN7juCjh.js,sha256=nFAVGriGoDe-udTjwGwz31kU7dg3GETzC1snnT0fq8A,406291
|
|
220
|
+
phoenix/server/static/assets/vendor-CUDAPm8e.js,sha256=vgwuODjGR2Mb8FeNurZOmbQrvxkBnWMaHtdQ69soFqA,1355429
|
|
221
|
+
phoenix/server/static/assets/vendor-DxkFTwjz.css,sha256=nZrkr0u6NNElFGvpWHk9GTHeGoibCXCli1bE7mXZGZg,1816
|
|
222
|
+
phoenix/server/static/assets/vendor-arizeai-Do2HOmcL.js,sha256=YDx2XE1Zwly6oS6Xv_-B792_jpNZ0bN_gvRaHY35btA,290966
|
|
223
|
+
phoenix/server/static/assets/vendor-codemirror-CrdxOlMs.js,sha256=KMJHeNKQyBjzBzKZEiDvIpx1hjhlb6zgALnE7CCgfCs,357576
|
|
224
|
+
phoenix/server/static/assets/vendor-recharts-PKRvByVe.js,sha256=Uul1I5FtZKipkx1ku4y2OqWd86GiO4aB4dA9o_LJbvM,282859
|
|
225
|
+
phoenix/server/static/assets/vendor-three-DwGkEfCM.js,sha256=0D12ZgKzfKCTSdSTKJBFR2RZO_xxeMXrqDp0AszZqHY,620972
|
|
216
226
|
phoenix/server/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
217
|
-
phoenix/server/templates/index.html,sha256=
|
|
227
|
+
phoenix/server/templates/index.html,sha256=lgWe7Smx5KT6XYqnLC2-ZJYtxCJIC-if0-_6TesO1_Q,3884
|
|
218
228
|
phoenix/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
219
229
|
phoenix/session/client.py,sha256=8dWs_-boxhrqJ-MQMkhXYYL_1YBDccz83nwirJdtBp0,32400
|
|
220
230
|
phoenix/session/data_extractor.py,sha256=dwhiDu-ISaXr8UI9I-CszZhB5BlUNmdDopjFZvMIXMw,2101
|
|
@@ -228,7 +238,7 @@ phoenix/trace/exporter.py,sha256=eAYemdvDCHMugDJiaR29BFFMTQBdf3oerdkz34Cl3hE,473
|
|
|
228
238
|
phoenix/trace/fixtures.py,sha256=tDso17oAYMBQ8GJsAlHFzrC0otXPzUOEh4TgIjEfB7M,14260
|
|
229
239
|
phoenix/trace/otel.py,sha256=WA720jvRadiZBAKjsYoPyXzypHwbyEK2OZRVUwtbjB8,9976
|
|
230
240
|
phoenix/trace/projects.py,sha256=2BwlNjFE-uwpqYtCu5YyBiYZk9wRPpM13vh3-Cv7GkA,2157
|
|
231
|
-
phoenix/trace/schemas.py,sha256=
|
|
241
|
+
phoenix/trace/schemas.py,sha256=HpWSyzec0yDHEQXEDuwyLbhpvKrqkGps8BJqGiIFj8Y,5978
|
|
232
242
|
phoenix/trace/span_evaluations.py,sha256=GaADtJLi2njra4aYaie0BIwkSgdxPB_SNseglI4ykZA,13104
|
|
233
243
|
phoenix/trace/span_json_decoder.py,sha256=W6T1U0xndE2a-85O1QalJmStJK1zF1IoSU97h1RoWeY,3231
|
|
234
244
|
phoenix/trace/span_json_encoder.py,sha256=tzSCIQJbeFBm33K68G8A5M12n_86tCDyuU0WAobxEz4,2010
|
|
@@ -256,8 +266,8 @@ phoenix/utilities/logging.py,sha256=lDXd6EGaamBNcQxL4vP1au9-i_SXe0OraUDiJOcszSw,
|
|
|
256
266
|
phoenix/utilities/project.py,sha256=qWsvKnG1oKhOFUowXf9qiOL2ia7jaFe_ijFFHEt8GJo,431
|
|
257
267
|
phoenix/utilities/re.py,sha256=PDve_OLjRTM8yQQJHC8-n3HdIONi7aNils3ZKRZ5uBM,2045
|
|
258
268
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
259
|
-
arize_phoenix-4.10.
|
|
260
|
-
arize_phoenix-4.10.
|
|
261
|
-
arize_phoenix-4.10.
|
|
262
|
-
arize_phoenix-4.10.
|
|
263
|
-
arize_phoenix-4.10.
|
|
269
|
+
arize_phoenix-4.10.2rc0.dist-info/METADATA,sha256=huzFjBtwJorG78GKuZSM-rGsz6eLA2GkWLdkXCh4oGU,11455
|
|
270
|
+
arize_phoenix-4.10.2rc0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
271
|
+
arize_phoenix-4.10.2rc0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
272
|
+
arize_phoenix-4.10.2rc0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
273
|
+
arize_phoenix-4.10.2rc0.dist-info/RECORD,,
|
phoenix/server/api/context.py
CHANGED
|
@@ -27,6 +27,7 @@ from phoenix.server.api.dataloaders import (
|
|
|
27
27
|
MinStartOrMaxEndTimeDataLoader,
|
|
28
28
|
ProjectByNameDataLoader,
|
|
29
29
|
RecordCountDataLoader,
|
|
30
|
+
SpanAnnotationsDataLoader,
|
|
30
31
|
SpanDescendantsDataLoader,
|
|
31
32
|
SpanEvaluationsDataLoader,
|
|
32
33
|
SpanProjectsDataLoader,
|
|
@@ -59,6 +60,7 @@ class DataLoaders:
|
|
|
59
60
|
trace_evaluations: TraceEvaluationsDataLoader
|
|
60
61
|
trace_row_ids: TraceRowIdsDataLoader
|
|
61
62
|
project_by_name: ProjectByNameDataLoader
|
|
63
|
+
span_annotations: SpanAnnotationsDataLoader
|
|
62
64
|
|
|
63
65
|
|
|
64
66
|
ProjectRowId: TypeAlias = int
|
|
@@ -26,6 +26,7 @@ from .latency_ms_quantile import LatencyMsQuantileCache, LatencyMsQuantileDataLo
|
|
|
26
26
|
from .min_start_or_max_end_times import MinStartOrMaxEndTimeCache, MinStartOrMaxEndTimeDataLoader
|
|
27
27
|
from .project_by_name import ProjectByNameDataLoader
|
|
28
28
|
from .record_counts import RecordCountCache, RecordCountDataLoader
|
|
29
|
+
from .span_annotations import SpanAnnotationsDataLoader
|
|
29
30
|
from .span_descendants import SpanDescendantsDataLoader
|
|
30
31
|
from .span_evaluations import SpanEvaluationsDataLoader
|
|
31
32
|
from .span_projects import SpanProjectsDataLoader
|
|
@@ -56,6 +57,7 @@ __all__ = [
|
|
|
56
57
|
"TraceEvaluationsDataLoader",
|
|
57
58
|
"TraceRowIdsDataLoader",
|
|
58
59
|
"ProjectByNameDataLoader",
|
|
60
|
+
"SpanAnnotationsDataLoader",
|
|
59
61
|
]
|
|
60
62
|
|
|
61
63
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from collections import defaultdict
|
|
2
|
+
from typing import (
|
|
3
|
+
AsyncContextManager,
|
|
4
|
+
Callable,
|
|
5
|
+
DefaultDict,
|
|
6
|
+
List,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from sqlalchemy import select
|
|
10
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
11
|
+
from strawberry.dataloader import DataLoader
|
|
12
|
+
from typing_extensions import TypeAlias
|
|
13
|
+
|
|
14
|
+
from phoenix.db import models
|
|
15
|
+
from phoenix.server.api.types.SpanAnnotation import SpanAnnotation, to_gql_span_annotation
|
|
16
|
+
|
|
17
|
+
Key: TypeAlias = int
|
|
18
|
+
Result: TypeAlias = List[SpanAnnotation]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SpanAnnotationsDataLoader(DataLoader[Key, Result]):
|
|
22
|
+
def __init__(self, db: Callable[[], AsyncContextManager[AsyncSession]]) -> None:
|
|
23
|
+
super().__init__(load_fn=self._load_fn)
|
|
24
|
+
self._db = db
|
|
25
|
+
|
|
26
|
+
async def _load_fn(self, keys: List[Key]) -> List[Result]:
|
|
27
|
+
span_annotations_by_id: DefaultDict[Key, Result] = defaultdict(list)
|
|
28
|
+
msa = models.SpanAnnotation
|
|
29
|
+
async with self._db() as session:
|
|
30
|
+
data = await session.stream_scalars(select(msa).where(msa.span_rowid.in_(keys)))
|
|
31
|
+
async for span_annotation in data:
|
|
32
|
+
span_annotations_by_id[span_annotation.span_rowid].append(
|
|
33
|
+
to_gql_span_annotation(span_annotation)
|
|
34
|
+
)
|
|
35
|
+
return [span_annotations_by_id[key] for key in keys]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import strawberry
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@strawberry.interface
|
|
7
|
+
class Annotation:
|
|
8
|
+
name: str = strawberry.field(
|
|
9
|
+
description="Name of the annotation, e.g. 'helpfulness' or 'relevance'."
|
|
10
|
+
)
|
|
11
|
+
score: Optional[float] = strawberry.field(
|
|
12
|
+
description="Value of the annotation in the form of a numeric score."
|
|
13
|
+
)
|
|
14
|
+
label: Optional[str] = strawberry.field(
|
|
15
|
+
description="Value of the annotation in the form of a string, e.g. "
|
|
16
|
+
"'helpful' or 'not helpful'. Note that the label is not necessarily binary."
|
|
17
|
+
)
|
|
18
|
+
explanation: Optional[str] = strawberry.field(
|
|
19
|
+
description="The annotator's explanation for the annotation result (i.e. "
|
|
20
|
+
"score or label, or both) given to the subject."
|
|
21
|
+
)
|
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
3
1
|
import strawberry
|
|
4
2
|
|
|
5
3
|
import phoenix.trace.v1 as pb
|
|
6
4
|
from phoenix.db.models import DocumentAnnotation, SpanAnnotation, TraceAnnotation
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
@strawberry.interface
|
|
10
|
-
class Evaluation:
|
|
11
|
-
name: str = strawberry.field(
|
|
12
|
-
description="Name of the evaluation, e.g. 'helpfulness' or 'relevance'."
|
|
13
|
-
)
|
|
14
|
-
score: Optional[float] = strawberry.field(
|
|
15
|
-
description="Result of the evaluation in the form of a numeric score."
|
|
16
|
-
)
|
|
17
|
-
label: Optional[str] = strawberry.field(
|
|
18
|
-
description="Result of the evaluation in the form of a string, e.g. "
|
|
19
|
-
"'helpful' or 'not helpful'. Note that the label is not necessarily binary."
|
|
20
|
-
)
|
|
21
|
-
explanation: Optional[str] = strawberry.field(
|
|
22
|
-
description="The evaluator's explanation for the evaluation result (i.e. "
|
|
23
|
-
"score or label, or both) given to the subject."
|
|
24
|
-
)
|
|
6
|
+
from .Annotation import Annotation
|
|
25
7
|
|
|
26
8
|
|
|
27
9
|
@strawberry.type
|
|
28
|
-
class TraceEvaluation(
|
|
10
|
+
class TraceEvaluation(Annotation):
|
|
29
11
|
@staticmethod
|
|
30
12
|
def from_pb_evaluation(evaluation: pb.Evaluation) -> "TraceEvaluation":
|
|
31
13
|
result = evaluation.result
|
|
@@ -50,7 +32,7 @@ class TraceEvaluation(Evaluation):
|
|
|
50
32
|
|
|
51
33
|
|
|
52
34
|
@strawberry.type
|
|
53
|
-
class SpanEvaluation(
|
|
35
|
+
class SpanEvaluation(Annotation):
|
|
54
36
|
@staticmethod
|
|
55
37
|
def from_pb_evaluation(evaluation: pb.Evaluation) -> "SpanEvaluation":
|
|
56
38
|
result = evaluation.result
|
|
@@ -75,7 +57,7 @@ class SpanEvaluation(Evaluation):
|
|
|
75
57
|
|
|
76
58
|
|
|
77
59
|
@strawberry.type
|
|
78
|
-
class DocumentEvaluation(
|
|
60
|
+
class DocumentEvaluation(Annotation):
|
|
79
61
|
document_position: int = strawberry.field(
|
|
80
62
|
description="The zero-based index among retrieved documents, which "
|
|
81
63
|
"is collected as a list (even when ordering is not inherently meaningful)."
|
phoenix/server/api/types/Span.py
CHANGED
|
@@ -19,12 +19,14 @@ from phoenix.server.api.helpers.dataset_helpers import (
|
|
|
19
19
|
get_dataset_example_input,
|
|
20
20
|
get_dataset_example_output,
|
|
21
21
|
)
|
|
22
|
-
from phoenix.server.api.types.DocumentRetrievalMetrics import DocumentRetrievalMetrics
|
|
23
|
-
from phoenix.server.api.types.Evaluation import DocumentEvaluation, SpanEvaluation
|
|
24
|
-
from phoenix.server.api.types.ExampleRevisionInterface import ExampleRevision
|
|
25
|
-
from phoenix.server.api.types.MimeType import MimeType
|
|
26
22
|
from phoenix.trace.attributes import get_attribute_value
|
|
27
23
|
|
|
24
|
+
from .DocumentRetrievalMetrics import DocumentRetrievalMetrics
|
|
25
|
+
from .Evaluation import DocumentEvaluation, SpanEvaluation
|
|
26
|
+
from .ExampleRevisionInterface import ExampleRevision
|
|
27
|
+
from .MimeType import MimeType
|
|
28
|
+
from .SpanAnnotation import SpanAnnotation
|
|
29
|
+
|
|
28
30
|
if TYPE_CHECKING:
|
|
29
31
|
from phoenix.server.api.types.Project import Project
|
|
30
32
|
|
|
@@ -60,6 +62,7 @@ class SpanKind(Enum):
|
|
|
60
62
|
agent = "AGENT"
|
|
61
63
|
reranker = "RERANKER"
|
|
62
64
|
evaluator = "EVALUATOR"
|
|
65
|
+
guardrail = "GUARDRAIL"
|
|
63
66
|
unknown = "UNKNOWN"
|
|
64
67
|
|
|
65
68
|
@classmethod
|
|
@@ -172,6 +175,15 @@ class Span(Node):
|
|
|
172
175
|
async def span_evaluations(self, info: Info[Context, None]) -> List[SpanEvaluation]:
|
|
173
176
|
return await info.context.data_loaders.span_evaluations.load(self.id_attr)
|
|
174
177
|
|
|
178
|
+
@strawberry.field(
|
|
179
|
+
description=(
|
|
180
|
+
"Annotations of the span's parent span. This encompasses both "
|
|
181
|
+
"LLM and human annotations."
|
|
182
|
+
)
|
|
183
|
+
) # type: ignore
|
|
184
|
+
async def span_annotations(self, info: Info[Context, None]) -> List[SpanAnnotation]:
|
|
185
|
+
return await info.context.data_loaders.span_annotations.load(self.id_attr)
|
|
186
|
+
|
|
175
187
|
@strawberry.field(
|
|
176
188
|
description="Evaluations of the documents associated with the span, e.g. "
|
|
177
189
|
"if the span is a RETRIEVER with a list of documents in its RETRIEVAL_DOCUMENTS "
|
|
@@ -6,17 +6,15 @@ from strawberry.relay import GlobalID, Node, NodeID
|
|
|
6
6
|
from strawberry.scalars import JSON
|
|
7
7
|
|
|
8
8
|
from phoenix.db import models
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
from .Annotation import Annotation
|
|
11
|
+
from .AnnotatorKind import AnnotatorKind
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
@strawberry.type
|
|
13
|
-
class SpanAnnotation(Node):
|
|
15
|
+
class SpanAnnotation(Node, Annotation):
|
|
14
16
|
id_attr: NodeID[int]
|
|
15
|
-
name: str
|
|
16
17
|
annotator_kind: AnnotatorKind
|
|
17
|
-
label: Optional[str]
|
|
18
|
-
score: Optional[float]
|
|
19
|
-
explanation: Optional[str]
|
|
20
18
|
metadata: JSON
|
|
21
19
|
span_rowid: Private[Optional[int]]
|
|
22
20
|
|
phoenix/server/app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import contextlib
|
|
2
|
+
import json
|
|
2
3
|
import logging
|
|
3
4
|
from datetime import datetime
|
|
4
5
|
from pathlib import Path
|
|
@@ -72,6 +73,7 @@ from phoenix.server.api.dataloaders import (
|
|
|
72
73
|
MinStartOrMaxEndTimeDataLoader,
|
|
73
74
|
ProjectByNameDataLoader,
|
|
74
75
|
RecordCountDataLoader,
|
|
76
|
+
SpanAnnotationsDataLoader,
|
|
75
77
|
SpanDescendantsDataLoader,
|
|
76
78
|
SpanEvaluationsDataLoader,
|
|
77
79
|
SpanProjectsDataLoader,
|
|
@@ -102,6 +104,8 @@ class AppConfig(NamedTuple):
|
|
|
102
104
|
min_dist: float
|
|
103
105
|
n_neighbors: int
|
|
104
106
|
n_samples: int
|
|
107
|
+
is_development: bool
|
|
108
|
+
manifest_json_path: str
|
|
105
109
|
|
|
106
110
|
|
|
107
111
|
class Static(StaticFiles):
|
|
@@ -111,8 +115,16 @@ class Static(StaticFiles):
|
|
|
111
115
|
|
|
112
116
|
def __init__(self, *, app_config: AppConfig, **kwargs: Any):
|
|
113
117
|
self._app_config = app_config
|
|
118
|
+
self.manifest = self._load_manifest()
|
|
114
119
|
super().__init__(**kwargs)
|
|
115
120
|
|
|
121
|
+
def _load_manifest(self) -> Dict[str, str]:
|
|
122
|
+
try:
|
|
123
|
+
with open(self._app_config.manifest_json_path, "r") as f:
|
|
124
|
+
return json.load(f)
|
|
125
|
+
except (FileNotFoundError, json.JSONDecodeError) as e:
|
|
126
|
+
raise e
|
|
127
|
+
|
|
116
128
|
async def get_response(self, path: str, scope: Scope) -> Response:
|
|
117
129
|
response = None
|
|
118
130
|
try:
|
|
@@ -134,6 +146,8 @@ class Static(StaticFiles):
|
|
|
134
146
|
"basename": request.scope.get("root_path", ""),
|
|
135
147
|
"platform_version": phoenix.__version__,
|
|
136
148
|
"request": request,
|
|
149
|
+
"is_development": self._app_config.is_development,
|
|
150
|
+
"manifest": self.manifest,
|
|
137
151
|
},
|
|
138
152
|
)
|
|
139
153
|
except Exception as e:
|
|
@@ -243,6 +257,7 @@ class GraphQLWithContext(GraphQL): # type: ignore
|
|
|
243
257
|
trace_evaluations=TraceEvaluationsDataLoader(self.db),
|
|
244
258
|
trace_row_ids=TraceRowIdsDataLoader(self.db),
|
|
245
259
|
project_by_name=ProjectByNameDataLoader(self.db),
|
|
260
|
+
span_annotations=SpanAnnotationsDataLoader(self.db),
|
|
246
261
|
),
|
|
247
262
|
cache_for_dataloaders=self.cache_for_dataloaders,
|
|
248
263
|
read_only=self.read_only,
|
|
@@ -377,6 +392,7 @@ def create_app(
|
|
|
377
392
|
umap_params: UMAPParameters,
|
|
378
393
|
corpus: Optional[Model] = None,
|
|
379
394
|
debug: bool = False,
|
|
395
|
+
dev: bool = False,
|
|
380
396
|
read_only: bool = False,
|
|
381
397
|
enable_prometheus: bool = False,
|
|
382
398
|
initial_spans: Optional[Iterable[Union[Span, Tuple[Span, str]]]] = None,
|
|
@@ -408,6 +424,7 @@ def create_app(
|
|
|
408
424
|
tracer_provider = None
|
|
409
425
|
strawberry_extensions = schema.get_extensions()
|
|
410
426
|
if server_instrumentation_is_enabled():
|
|
427
|
+
tracer_provider = initialize_opentelemetry_tracer_provider()
|
|
411
428
|
from opentelemetry.trace import TracerProvider
|
|
412
429
|
from strawberry.extensions.tracing import OpenTelemetryExtension
|
|
413
430
|
|
|
@@ -494,6 +511,8 @@ def create_app(
|
|
|
494
511
|
min_dist=umap_params.min_dist,
|
|
495
512
|
n_neighbors=umap_params.n_neighbors,
|
|
496
513
|
n_samples=umap_params.n_samples,
|
|
514
|
+
is_development=dev,
|
|
515
|
+
manifest_json_path=SERVER_DIR / "static" / ".vite" / "manifest.json",
|
|
497
516
|
),
|
|
498
517
|
),
|
|
499
518
|
name="static",
|
phoenix/server/main.py
CHANGED
|
@@ -130,7 +130,9 @@ if __name__ == "__main__":
|
|
|
130
130
|
parser.add_argument("--read-only", type=bool, default=False)
|
|
131
131
|
parser.add_argument("--no-internet", action="store_true")
|
|
132
132
|
parser.add_argument("--umap_params", type=str, required=False, default=DEFAULT_UMAP_PARAMS_STR)
|
|
133
|
-
parser.add_argument("--debug", action="
|
|
133
|
+
parser.add_argument("--debug", action="store_true")
|
|
134
|
+
# Whether the app is running in a development environment
|
|
135
|
+
parser.add_argument("--dev", action="store_true")
|
|
134
136
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
135
137
|
serve_parser = subparsers.add_parser("serve")
|
|
136
138
|
datasets_parser = subparsers.add_parser("datasets")
|
|
@@ -258,6 +260,7 @@ if __name__ == "__main__":
|
|
|
258
260
|
if corpus_inferences is None
|
|
259
261
|
else create_model_from_inferences(corpus_inferences),
|
|
260
262
|
debug=args.debug,
|
|
263
|
+
dev=args.dev,
|
|
261
264
|
read_only=read_only,
|
|
262
265
|
enable_prometheus=enable_prometheus,
|
|
263
266
|
initial_spans=fixture_spans,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_components-C8sm_r1F.js": {
|
|
3
|
+
"file": "assets/components-C8sm_r1F.js",
|
|
4
|
+
"name": "components",
|
|
5
|
+
"imports": [
|
|
6
|
+
"_vendor-CUDAPm8e.js",
|
|
7
|
+
"_vendor-arizeai-Do2HOmcL.js",
|
|
8
|
+
"_pages-bN7juCjh.js",
|
|
9
|
+
"_vendor-three-DwGkEfCM.js",
|
|
10
|
+
"_vendor-codemirror-CrdxOlMs.js"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"_pages-bN7juCjh.js": {
|
|
14
|
+
"file": "assets/pages-bN7juCjh.js",
|
|
15
|
+
"name": "pages",
|
|
16
|
+
"imports": [
|
|
17
|
+
"_vendor-CUDAPm8e.js",
|
|
18
|
+
"_components-C8sm_r1F.js",
|
|
19
|
+
"_vendor-arizeai-Do2HOmcL.js",
|
|
20
|
+
"_vendor-recharts-PKRvByVe.js",
|
|
21
|
+
"_vendor-codemirror-CrdxOlMs.js"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"_vendor-!~{003}~.js": {
|
|
25
|
+
"file": "assets/vendor-DxkFTwjz.css",
|
|
26
|
+
"src": "_vendor-!~{003}~.js"
|
|
27
|
+
},
|
|
28
|
+
"_vendor-CUDAPm8e.js": {
|
|
29
|
+
"file": "assets/vendor-CUDAPm8e.js",
|
|
30
|
+
"name": "vendor",
|
|
31
|
+
"imports": [
|
|
32
|
+
"_vendor-three-DwGkEfCM.js"
|
|
33
|
+
],
|
|
34
|
+
"css": [
|
|
35
|
+
"assets/vendor-DxkFTwjz.css"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"_vendor-arizeai-Do2HOmcL.js": {
|
|
39
|
+
"file": "assets/vendor-arizeai-Do2HOmcL.js",
|
|
40
|
+
"name": "vendor-arizeai",
|
|
41
|
+
"imports": [
|
|
42
|
+
"_vendor-CUDAPm8e.js"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"_vendor-codemirror-CrdxOlMs.js": {
|
|
46
|
+
"file": "assets/vendor-codemirror-CrdxOlMs.js",
|
|
47
|
+
"name": "vendor-codemirror",
|
|
48
|
+
"imports": [
|
|
49
|
+
"_vendor-CUDAPm8e.js"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"_vendor-recharts-PKRvByVe.js": {
|
|
53
|
+
"file": "assets/vendor-recharts-PKRvByVe.js",
|
|
54
|
+
"name": "vendor-recharts",
|
|
55
|
+
"imports": [
|
|
56
|
+
"_vendor-CUDAPm8e.js"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"_vendor-three-DwGkEfCM.js": {
|
|
60
|
+
"file": "assets/vendor-three-DwGkEfCM.js",
|
|
61
|
+
"name": "vendor-three"
|
|
62
|
+
},
|
|
63
|
+
"index.tsx": {
|
|
64
|
+
"file": "assets/index-BEKPzgQs.js",
|
|
65
|
+
"name": "index",
|
|
66
|
+
"src": "index.tsx",
|
|
67
|
+
"isEntry": true,
|
|
68
|
+
"imports": [
|
|
69
|
+
"_vendor-CUDAPm8e.js",
|
|
70
|
+
"_vendor-arizeai-Do2HOmcL.js",
|
|
71
|
+
"_components-C8sm_r1F.js",
|
|
72
|
+
"_pages-bN7juCjh.js",
|
|
73
|
+
"_vendor-three-DwGkEfCM.js",
|
|
74
|
+
"_vendor-codemirror-CrdxOlMs.js",
|
|
75
|
+
"_vendor-recharts-PKRvByVe.js"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|